package de.baumann.browser.api.net

import de.baumann.browser.BuildConfig
import de.baumann.browser.api.net.base.BaseUrl
import de.baumann.browser.api.net.vo.Result
import de.baumann.browser.api.net.vo.duobao.CYJL
import de.baumann.browser.api.net.vo.duobao.DuoBao
import de.baumann.browser.api.net.vo.duobao.WFGZ
import de.baumann.browser.api.net.vo.duobao.ZJXX
import io.reactivex.Observable
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

@BaseUrl("${BuildConfig.DUOBAO_API_URL}api/common/")
interface DuoBaoCommonApiService {
    @FormUrlEncoded
    @POST("selectAnnounceInfo")
    fun selectAnnounceInfo(@Field("activityId") id: String): Observable<Result<DuoBao>>

    @FormUrlEncoded
    @POST("selectJoinList")
    fun selectJoinList(@Field("activityId")id:String):Observable<Result<List<CYJL>>>

    @FormUrlEncoded
    @POST("selectAnnounceUserInfo")
    fun selectAnnounceUserInfo(@Field("activityId")id:String):Observable<Result<ZJXX>>

    @FormUrlEncoded
    @POST("selectJoinInfo")
    fun selectJoinInfo(@Field("participationInfoId")id:String):Observable<Result<CYJL>>

    @POST("getOdinTreasureConfig")
    fun getOdinTreasureConfig():Observable<Result<WFGZ>>
}